home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / comms / other / dlg_1_27 / install_dlg < prev    next >
Text File  |  1999-04-19  |  7KB  |  294 lines

  1. ; Install-Script for DLG Pre-Release
  2. ; Begin header segment
  3.  
  4. (user 2)
  5. (welcome)
  6.  
  7. ; Check installer version
  8.  
  9. (set ver @installer-version)
  10. (set ver (/ ver 65536))
  11.  
  12. (if
  13.    (< ver 43)
  14.    (
  15.       (abort
  16.          (cat  "This installer script requires V43 of the Amiga Installer. You will need a copy of the V43 "
  17.                "Installer in your command path (C: or Sys:) or change the icon of this installer to point to "
  18.                "wherever you have your installer at. You may download Installer V43 from AmiNet, from the DLG "
  19.                "web site ( http://www.ald.net/dlg ) or contact Digerati Dreams for a copy of the V43 installer."
  20.          )
  21.       )
  22.    )
  23. )
  24.  
  25.  
  26. ; check for workbench 2.x
  27.  
  28. (set ver (getversion))
  29. (set ver (/ ver 65536))
  30.  
  31. (if (< ver 37)
  32.    (Abort
  33.      "DLG 1.27 needs KickStart 2.04 (v37) or later. It seems not to be installed on your system."
  34.    )
  35. )
  36.  
  37. (set #FidoOK 0)
  38.  
  39. ; End Header segment
  40.  
  41. ;;; Begin Check-for-DLG components
  42.  
  43. (set #AbortMe 0)
  44. (set #OptionalsOK 1)
  45.  
  46. ;;; Check for DLG:
  47. (if
  48.    (exists "DLG:" (noreq))
  49.    (
  50.       (set @default-dest (expandpath "DLG:/"))
  51.       (set #dlg-dir (expandpath "DLG:") )
  52.    )
  53.    (  (message "Cannot find the assign \"DLG:\"")
  54.       (set #AbortMe 1)
  55.    )
  56. )
  57. ;;-
  58. ;;; Check for DLGConfig:
  59. (if
  60.    (exists "DLGConfig:" (noreq))
  61.    (
  62.       (set #config-dir (expandpath "DLGConfig:") )
  63.    )
  64.    (  (message "Cannot find the assign \"DLGConfig:\"")
  65.       (set #AbortMe 1)
  66.    )
  67. )
  68. ;;-
  69. ;;; Check for Handler
  70. (if
  71.    (NOT(exists "l:tpt-handler" (noreq)))
  72.    (  (message "Cannot find TPT-Handler")
  73.       (set #AbortMe 1)
  74.    )
  75. )
  76. ;;-
  77. ;;; Check for Fido:
  78. (if
  79.    (exists "Fido:" (noreq))
  80.    (
  81.       (set #fido-dir (expandpath "Fido:") )
  82.       (set #FidoOK 1)
  83.    )
  84.    (  (message "Non-fatal error: cannot find the assign \"Fido:\". Fido utils will not be installed." )
  85.       (set #FidoOK 0)
  86.       (set #OptionalsOK 0)
  87.    )
  88. )
  89. ;;-
  90.  
  91. ;;; What to do if something vital is missing
  92. (if
  93.    (= #AbortMe 1)
  94.    (Abort
  95.       (cat  "This installer is intended as an upgrade to currently installed DLG systems. At least one "
  96.             "DLG component is missing on your system.  If you believe that you have DLG installed properly "
  97.             "you will need to contact DLG technical support for assistance. You may contact DLG technical "
  98.             "support in a number of ways:\n\n"
  99.             "Email to dlg@cts.com\n"
  100.             "Web page at http://www.ald.net/dlg\n"
  101.             "FidoNet netmail to Jeff Grimmett at 1:202/720 or 40:405/101\n"
  102.             "Fidonet echo DLG_SUPPORT\n"
  103.       )
  104.    )
  105. )
  106. ;;-
  107. ;;; What to do if something optional is missing
  108. (if
  109.    (= #OptionalsOK 0)
  110.    (if
  111.       (NOT
  112.          (askbool
  113.             (prompt
  114.                (cat  "One or more optional components were not found on your system. If this is as you "
  115.                      "intended, then you may proceed and the optional components will not be updated. If "
  116.                      "you use those optional components and wish to update them, then you will need to "
  117.                      "correct the problem before installing."
  118.                )
  119.             )
  120.             (help @askchoice-help)
  121.             (choices "I meant to do that." "Abort! I need those things!")
  122.             (default 1)
  123.          )
  124.       )
  125.       (exit
  126.          (cat  "You need to correct the problem with your system and then re-run the installer. If you believe "
  127.                "that you have the missing components installed properly you will need to contact DLG "
  128.                "technical support for assistance. You may contact DLG technical support in a number of ways:\n\n"
  129.                "Email to dlg@cts.com\n"
  130.                "Web page at http://www.ald.net/dlg\n"
  131.                "FidoNet netmail to Jeff Grimmett at 1:202/720 or 40:405/101\n"
  132.                "Fidonet echo DLG_SUPPORT\n"
  133.          )
  134.          (quiet)
  135.       )
  136.    )
  137. )
  138. ;;-
  139.  
  140. ;;- End Check-for-DLG
  141.  
  142. ;;; Begin "Backup first!" warning
  143.  
  144. (if
  145.    (NOT
  146.       (askbool
  147.          (prompt
  148.             (cat  "You should make backups of your software before you proceed. While we have taken every "
  149.                   "precaution, there is still a slight chance that you might need to revert back to an "
  150.                   "older version if something doesn't work. Be prepared!"
  151.             )
  152.          )
  153.          (help @askchoice-help)
  154.          (choices "I am prepared." "Abort! I need to backup!")
  155.          (default 1)
  156.       )
  157.    )
  158.    (exit
  159.       (cat  "Aborting installation process. To make good backups, you need to back up the following: \n\n"
  160.             "Contents of DLG: directory\n"
  161.             "Libs:DLG.library\n"
  162.             "L:TPT-Handler\n"
  163.             "Contents of DLGConfig:\n"
  164.             "Contents of Fido:\n\n"
  165.             "When you have completed backing up your software, run this installer again and tell it you are "
  166.             "prepared when it asks."
  167.       )
  168.       (quiet)
  169.    )
  170. )
  171.  
  172. ;;- End "Backup First!" warning
  173.  
  174. ; Begin handler update
  175.  
  176. (if
  177.    (exists "L:Tpt-Handler" (noreq))
  178.    (
  179.       (working "Updating handler.")
  180.       (
  181.          (set @execute-dir "c")
  182.          (set #result (run "update"))
  183.       )
  184.  
  185.       (if
  186.          (<> #result 0)
  187.          (abort
  188.             (cat  "An error occurred when trying to upgrade L:TPT-Handler. "
  189.                   "Contact Digerati Dreams for instructions."
  190.             )
  191.          )
  192.       )
  193.    )
  194. )
  195.  
  196. ; End handler update
  197.  
  198. ; Begin library segment
  199.  
  200. (set cpu (database "cpu"))
  201.  
  202. (if
  203.    (NOT (OR (= cpu "68000") (= cpu "68010")))
  204.       (
  205.          (set sourcelib "libs/dlg.library_68030")
  206.          (set sourcerlib "libs/dlgrexx.library_68030")
  207.       )
  208.       (
  209.          (set sourcelib "libs/dlg.library_any")
  210.          (set sourcerlib "libs/dlgrexx.library_any")
  211.       )
  212. )
  213.  
  214. (copyfiles
  215.    (prompt "Copying " cpu " version of DLG.library to LIBS:")
  216.    (help @copyfiles-help)
  217.    (source sourcelib)
  218.    (dest "Libs:")
  219.    (newname "dlg.library")
  220. )
  221.  
  222. (copyfiles
  223.    (prompt "Copying " cpu " version of DLGRexx.library to LIBS:")
  224.    (help @copyfiles-help)
  225.    (source sourcerlib)
  226.    (dest "Libs:")
  227.    (newname "dlgrexx.library")
  228. )
  229.  
  230. ; End library segment
  231. ;;; Begin Executable Modules
  232.  
  233. (copyfiles
  234.    (prompt "Copying DLG Modules to " #dlg-dir)
  235.    (help @copyfiles-help)
  236.    (source "DLG")
  237.    (all)
  238.    (dest #dlg-dir)
  239. )
  240.  
  241. ;;- End executables
  242.  
  243. ;;; Begin Fido modules
  244.  
  245. (if
  246.    (= #FidoOK 1)
  247.    (copyfiles
  248.       (prompt "Copying Fido Modules to " #fido-dir)
  249.       (help @copyfiles-help)
  250.       (source "FIDO")
  251.       (all)
  252.       (dest #fido-dir)
  253.    )
  254. )
  255.  
  256. ;;- End Fido Modules
  257.  
  258. ;;; Begin Configs
  259.  
  260. (copyfiles
  261.    (prompt "Copying new configs to " #config-dir)
  262.    (help @copyfiles-help)
  263.    (source "DLGConfig")
  264.    (all)
  265.    (Confirm)            ; Uncomment this for more than one dir
  266.    (dest #config-dir)
  267. )
  268.  
  269. ;;- End Configs
  270.  
  271. ;;; Begin Message components
  272.  
  273. (  (message
  274.       (cat
  275.          "Please read Changes.txt that was included in this archive. It contains much information "
  276.          "that is vital for using new modules and settings released with this version of DLG."
  277.       )
  278.    )
  279. )
  280.  
  281. ;;- End Message
  282.  
  283. ;;; Begin exit
  284.  
  285. (exit
  286.    (Cat
  287.       "Installation is complete! Now is a good time to read the DLG Update documentation.\n\n"
  288.       "A FULL REBOOT IS REQUIRED to get everything working."
  289.    )
  290.    (quiet)
  291. )
  292.  
  293. ;;;- End Exit
  294.